import instance from "@/utils/http";

// 查
export const getTableAPI = (params) => {
    return instance({
        method: 'GET',
        url: '/table',
        params: params
    })
}

// 增
export const addTableAPI = (data) => {
    return instance({
        method: 'POST',
        url: '/table',
        data: data
    })
}

// 删
export const delTableAPI = (id) => {
    return instance({
        method: 'DELETE',
        url: '/table/' + id
    })
}

// 改
export const updateTableAPI = (id, data) => {
    return instance({
        method: 'PUT',
        url: '/table/' + id,
        data: data
    })
}